package top.laoshuzi.designpatterns.base.behavior.visitor;

import org.junit.Test;

public class Client {

    @Test
    public void operation() {

        //创建结构对象
        ObjectStructure structure = new ObjectStructure();

        //增加节点
        structure.add(new ConcreteNodeA());
        structure.add(new ConcreteNodeB());

        //创建访问者
        Visitor visitor = new ConcreteVisitorA();
        structure.action(visitor);

    }
}
